package main

import "fmt"

/*
select 从多个通道接收值
 */

func main() {
	ch := make(chan int, 1)
	for i := 0; i < 10; i++ {
		select {
		case x := <- ch:
			fmt.Println(x)
		case ch <- i:
		}
	}

}
